﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Workflow.Activities;

namespace Lisphi.Lab.ProfWFChap05
{
    [ExternalDataExchange]
    public interface IEnrollmentService
    {
        void RequestEnrollmentStatus(string name);
        event EventHandler<ExternalDataEventArgs> EnrollmentApproval;
    }

    [Serializable]
    public class EnrollmentRequestEventArgs : ExternalDataEventArgs
    {
        private string applicantName;

        public string ApplicantName
        {
            get { return this.applicantName; }
        }

        public EnrollmentRequestEventArgs(Guid instanceId, string applicantName)
            : base(instanceId)
        {
            this.applicantName = applicantName;
        }
    }

    [Serializable]
    public class EnrollmentApprovalEventArgs : ExternalDataEventArgs
    {
        private bool approved;

        public bool Approved
        {
            get { return this.approved; }
        }

        public EnrollmentApprovalEventArgs(Guid instanceId, bool approved)
            : base(instanceId)
        {
            this.approved = approved;
        }
    }

}
